package gov.pbc.nn.kjgl.train.view;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.bstek.bdf2.core.context.ContextHolder;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.data.provider.Criteria;
import com.bstek.dorado.data.provider.Page;

import gov.pbc.nn.core.utils.SecurityUtils;
import gov.pbc.nn.kjgl.entity.TrainingPlan;
import gov.pbc.nn.kjgl.train.dao.QueryTrainPlanDao;
import gov.pbc.nn.kjgl.train.dao.TrainRegisterJdbcDao;
import gov.pbc.nn.uflo.entity.Opinion;

@Component
public class QueryTrainPlanPR {

	@Autowired
	private QueryTrainPlanDao queryTrainPlanDao;
	@Autowired
	private TrainRegisterJdbcDao trainRegisterJdbcDao;


	@DataProvider
	public void QueryAll(Page<TrainingPlan> page,Criteria criteria, String type) {
		trainRegisterJdbcDao.QueryAll(page,criteria, type);
	}
	
	@DataProvider
	public List<Opinion> loadOpinion(String id) {
		return queryTrainPlanDao.loadOpinion(id);
	}
}
